package com.filmbooks.contract.book;

import android.widget.ImageView;

import com.filmbooks.model.home.bean.book.BookItemBean;
import com.filmbooks.model.home.bean.book.BookListBean;
import com.zyw.horrarndoo.sdk.base.BasePresenter;
import com.zyw.horrarndoo.sdk.base.IBaseFragment;
import com.zyw.horrarndoo.sdk.base.IBaseModel;
import com.zyw.horrarndoo.sdk.base.IBaseView;

import java.util.List;

import io.reactivex.Observable;

/**
 * Created by heshuxiang on 2018/3/6.
 * 描述：
 * 公司：盟将威
 * 作者：heshuxiang
 * 日期：2018/3/6.
 * 工程：FilmBooks
 * 包：com.filmbooks.contract.book
 */

public interface BookCustomContract {
    abstract class BookCustomPresenter extends BasePresenter<IBookCustomModel, IBookCustomView> {
        public abstract void loadLatestBookList();

        public abstract void loadMoreBookList();

        /**
         * item点击事件
         *
         * @param position  position
         * @param item      item
         * @param imageView imageView
         */
        public abstract void onItemClick(int position, BookItemBean item, ImageView imageView);

    }

    interface IBookCustomModel extends IBaseModel {
        Observable<BookListBean> getBookListWitchTag(String tag, int start, int count);
    }

    interface IBookCustomView extends IBaseFragment {
        /**
         * 更新界面list
         *
         * @param list list
         */
        void updateContentList(List<BookItemBean> list);

        /**
         * 显示网络错误
         */
        void showNetworkError();

        /**
         * 显示加载更多错误
         */
        void showLoadMoreError();

        /**
         * 显示没有更多数据
         */
        void showNoMoreData();

        /**
         * 返回定制book tags
         *
         * @return 定制book tags
         */
        String getBookTags();
    }
}
